package com.zmn.oms.admin.controller.conf.reply.question;

import com.zmn.mcc.cas.model.LoginStaff;
import com.zmn.mcc.cas.web.StaffAdminService;
import com.zmn.oms.services.interfaces.conf.reply.ReplyAnswerService;
import com.zmn.oms.services.interfaces.conf.reply.ReplyCategoryService;
import com.zmn.oms.services.interfaces.conf.reply.ReplyQuestionService;

import javax.annotation.Resource;
import java.util.Objects;

/**
 * @author linfeng
 * @description
 * @since 2020/04/16 18:37
 * @modifier
 **/
public class ReplyQuestionBaseController {
    @Resource
    ReplyQuestionService replyQuestionService;
    @Resource
    ReplyCategoryService replyCategoryService;
    @Resource
    ReplyAnswerService replyAnswerService;

    /**
     * 获取登录用户名
     *
     * @param
     * @return
     */
    public String getMcStaffRealName() {
        LoginStaff staff = StaffAdminService.currentStaff();
        if (Objects.nonNull(staff)) {
            return staff.getRealName();
        } else {
            return "";
        }
    }
}
